package com.glsc.ngateway.common.api.platform.dto.other;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * @author libj
 * @date 2022/04/19
 * 交易单元租用流水Dto
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
public class TradeSeatHistoryDto {
    @ApiModelProperty(value = "交易单元ID")
    private Integer tradeSeatId;

    @ApiModelProperty(value = "交易单元号")
    private String tradeSeatCode;

    @ApiModelProperty(value = "市场")
    private String tradeSeatMarket;

    @ApiModelProperty(value = "交易单元类型 字典: am_trade_seat_use_type")
    private String useType;

    @ApiModelProperty(value = "使用机构ID")
    private String useCompanyId;

    @ApiModelProperty(value = "使用机构")
    private String useCompanyName;

    @ApiModelProperty(value = "使用说明")
    private String useDesc;

    @ApiModelProperty(value = "申请部门ID")
    private Integer applyDeptId;

    @ApiModelProperty(value = "申请部门")
    private String applyDeptName;

    @ApiModelProperty(value = "费用承担部门ID（不分摊）")
    private Integer expenseDeptId;

    @ApiModelProperty(value = "费用承担部门（不分摊）")
    private String expenseDeptName;

    @ApiModelProperty(value = "分摊原则（分摊）")
    private String expenseDesc;

    @ApiModelProperty(value = "交易单元状态 字典: am_trade_seat_state")
    private String state;

    @ApiModelProperty(value = "OA流程")
    private String oaRequestId;

    @ApiModelProperty(value = "纸质版申请")
    private String offlineApply;

    @ApiModelProperty(value = "开通时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private String beginDate;

    @ApiModelProperty(value = "停用时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private String endDate;

    @ApiModelProperty(value = "申请人ID")
    private String applicantAccount;

    @ApiModelProperty(value = "申请类型")
    private String applyType;

    @ApiModelProperty(value = "申请类型编码")
    private Integer applyTypeCode;

    @ApiModelProperty(value = "变更类型")
    private String changeType;

    @ApiModelProperty(value = "变更类型编码")
    private Integer changeTypeCode;

    @ApiModelProperty(value = "申请时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private String applyDate;

    @ApiModelProperty(value = "申请说明")
    private String applyDesc;

    @ApiModelProperty(value = "交易单元数据来源 字典: am_trade_seat_source")
    private String dataSource;

    @ApiModelProperty(value = "批次Id")
    private String importKey;

    @ApiModelProperty(value = "创建时间 yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "创建人ID")
    private String createOperator;

    @ApiModelProperty(value = "创建人姓名")
    private String createOperatorName;

    //操作人员信息
    @ApiModelProperty(value = "操作来源")
    private String opSource;

    @ApiModelProperty(value = "操作动作(增加、修改)")
    private String opAction;

    @ApiModelProperty(value = "操作人员ID")
    private String opOperator;

    @ApiModelProperty(value = "操作人员姓名")
    private String opOperatorName;

    @ApiModelProperty(value = "操作时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime opTime;
}
